//
//  BillDetailCell.m
//  Shengzhuli
//
//  Created by FXGuo on 17/3/20.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "BillDetailCell.h"

@interface BillDetailCell()
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
@property (weak, nonatomic) IBOutlet UILabel *priceLab;
@property (weak, nonatomic) IBOutlet UILabel *timeLab;



@end

@implementation BillDetailCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(ChargeListModel *)model
{
    _model = model;
    if (model.explain.length>0) {
        self.titleLab.text = model.explain;
    }else{
        self.titleLab.text = model.content;
    }
    self.priceLab.text = [NSString stringWithFormat:@"%@",model.amount];
    if (model.date) {
        self.timeLab.text = model.date;
    }else {
        self.timeLab.text = model.createDate;
    }
}
- (void)setIsScore:(BOOL)isScore
{
    _isScore = isScore;
    if (self.model.tradeDirection == 2) {
        self.priceLab.text = [NSString stringWithFormat:@"-%@",self.model.amount];
    }else {
        self.priceLab.text = [NSString stringWithFormat:@"+%@",self.model.amount];
    }
}

@end
